import {Component, OnInit} from '@angular/core';
import {ModalController} from '@ionic/angular';
import {LoginComponent} from '../common/component/login/login.component';

@Component({
    selector: 'app-profile',
    templateUrl: './profile.component.html',
    // styleUrls: ['./profile.component.less'],
})
export class ProfileComponent implements OnInit {

    constructor(
        public modalController: ModalController
    ) {
    }

    logined = true; // 已登录

    ngOnInit() {
    }

    async goLogin() {
        const modal = await this.modalController.create({
            component: LoginComponent,
            cssClass: 'my-custom-class'
        });
        return await modal.present();
    }

    outLogin() {
        this.logined = false;
    }
}
